/*
 * 
 * the basic types of the features
 * 
 * Created on March 26, 2010, 10:10 PM
 * Copyright (C) 2010 HIT-CIR
 */
package nlpeap.feature.basictypes;

/**
 * @author yxf
 *
 */
public enum NPTypeTag {
	AUX,  // charniak special for be verb 
	AUXG, // charnial special for the being verb
	ADJP, // adj phrase
	ADVP, // adv phrase
	CC,  //Coordinating conjunction  
	CD,  //Cardinal number  
	DT,  //Determiner  
	EX,  //Existential there  
	FW,  //Foreign word  
	IN,  //Preposition or subordinating conjunction  
	JJ,  //Adjective  
	JJR,  //Adjective, comparative  
	JJS,  //  Adjective, superlative  
	LRB, // left bracket
	LS,  //  List item marker  
	MD,  //  Modal  
	NN,  //  Noun, singular or mass  
	NNP,  //  Proper noun, singular  
	NNPS,  //  Proper noun, plural  
	NNS,  //  Noun, plural  
	NP, //noun phrase
	NULL,
	O,
	PDT,  //  Predeterminer  
	POS,  //  Possessive ending  
	PP, //prep phrase
	PRP$,  //  Possessive pronoun  
	PRP,  //  Personal pronoun  
	PRT, 
	RB,  //  Adverb  
	RBR,  //  Adverb, comparative  
	RBS,  //  Adverb, superlative  
	RP,  //  Particle  
	RRB, //right bracket
	SBAR, //clause
	SYM,  //  Symbol  
	TO,  //  to  
	UH,  //  Interjection  
	VB,  //  Verb, base form  
	VBD,  //  Verb, past tense  
	VBG,  //  Verb, gerund or present participle  
	VBN,  //  Verb, past participle  
	VBP,  //  Verb, non-3rd person singular present  
	VBZ,  //  Verb, 3rd person singular present  
	VP, //verb phrase
	WDT,  //  Wh-determiner  
	WP$,  //  Possessive wh-pronoun  
	WP,  //  Wh-pronoun  
	WRB;  //  Wh-adverb 
	
/*
	private static final String[] tagString = {
		"CC", "CD", "DT", "EX","FW","IN","JJ","JJR","JJS","LS","MD","NN","NNS","NNP","NNPS",
		"PDT","POS","PRP","PRP$","RB","RBR","RBS","RP","SYM","TO","UH","VB","VBD","VBG","VBN",
		"VBP","VBZ","WDT","WP","WP$","WRB","NP","VP","PP"
	};
*/	
	public static NPTypeTag parse(String strTag){
		strTag = strTag.trim();
	    for (NPTypeTag m : NPTypeTag.values()){
	    	if (m.matches(strTag)){
	    		return m;
	    	}
	    }
	    return NULL;
	}

	
	private boolean matches(String s) {
		return s.equalsIgnoreCase(toString());
	}

	

	
}
